package org.example.what_mall.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GlobalCode {
    SUCCESS(0,"成功"),
    OK(200,null),
    PARAMETER_FAIL(1101, "参数验证失败"),
    UNAUTHORIZED(1102, "未授权"),
    CATEGORY_EXIST(1103, "类目名称已存在"),
    GOODS_NOT_EXIST(1104, "商品不存在"),
    SPECIFICATION_NOT_EXIST(1105, "规格不存在"),
    ORDER_NOT_EXIST(1106, "订单不存在"),
    MESSAGE_NOT_EXIST(1107, "留言不存在"),
    STOCK_NOT_ENOUGH(1108, "库存不足"),
    SERVER_ERROR(1109, "服务器内部错误"),
    ;

    private final int code;
    private final String message;


}
